//
//  DropTwoViewController.m
//  YYPopMenuView
//
//  Created by 蓓蕾 on 2021/8/26.
//

#import "DropTwoViewController.h"

@interface DropTwoViewController ()<YYMenuDataSource, YYMenuDelegate>

@end

@implementation DropTwoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self createDropMenu];
}

-(void)createDropMenu
{
    YYTopMenuView *topMenuView = [[YYTopMenuView alloc] initWithOrigin:CGPointMake(0, 65) andDefaultColumnArr:@[@"你是谁",@"你猜",@"筛选"] andNormalImageArr:@[] andSelectImageArr:@[] andHeight:40];
    [self.view addSubview:topMenuView];
    topMenuView.leftTitleArr = @[@"体检类型",@"预约时间"];
    topMenuView.rightContentArr = @[@[@"不限",@"核酸检测",@"入职体检",@"全身体检",@"青年体检",@"中年体检",@"老年体检",@"肿瘤筛选",@"孕前检查",@"婚前检查",@"疾病筛选",@"儿童体检",@"健康证体检",@"特惠套餐"],@[@"不限",@"周六可约",@"周天可约",@"提前1天约",@"提前2天约",@"提前3天约",@"3天以上"]];
    topMenuView.dataSource = self;
    topMenuView.delegate = self;
    [topMenuView selectDeafultIndexPath];
    [topMenuView initSelectView];
    
}

-(NSInteger)numberOfColumnsInMenu:(YYTopMenuView *)menu
{
    return 3;
}

//每个column有多少行
- (NSInteger)menu:(YYTopMenuView *)menu numberOfRowsInColumn:(NSInteger)column
{
    return 5;
}
//每个column中每行的title
- (NSString *)menu:(YYTopMenuView *)menu titleForRowAtIndexPath:(YYIndexPath *)indexPath
{
    return [NSString stringWithFormat:@"第 %ld 列，第 %ld 行",indexPath.column,indexPath.row];;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
